<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let zhStr = "湖北省"
        // api encodeURI 可以把中文转换成url编码
        console.log( encodeURI(zhStr) )    
        
        let urlStr = "%E6%AD%A6%E6%B1%89%E5%B8%82"
        // api decodeURI 可以把url编码还原成中文
        console.log(decodeURI( urlStr ))
    </script>
</body>
</html>